﻿@using LeadMaster.Models
@model LeadMaster.ViewModels.ViewModelData

<div class="spacer"></div>
@using (Html.BeginForm())
{
@Html.ValidationSummary(true)
<fieldset>
<legend class="boxtitle" style="width: 140px;">Manage Data</legend>
<div class="spacer"></div>
<div>
@Html.DropDownList("CallCentreID", null, "Any particular centre ?", new { @class="chosen", style="width: 300px;"})
</div>
<div>
<div class="spacer"></div>
<label style="width: 70px;">Date Start</label>
@Html.TextBox("DateStart", DateTime.Now.ToShortDateString(), new { @class = "datepicker" })
</div>
<div class="spacer"></div>
<div>
<label style="width: 70px;">Date End</label>
@Html.TextBox("DateEnd", DateTime.Now.ToShortDateString(), new { @class = "datepicker" })
</div>
<div class="spacer"></div>
<div>
<label style="width: 70px;">Forename</label>
<input type="text" name="forename" value="@(ViewBag.ForeName)"/>
</div>
<div class="spacer"></div>
<div>
<label style="width: 70px;">Surname</label>
<input type="text" name="surname" value="@(ViewBag.SurName)" />
</div>
<div class="spacer"></div>
<input type="submit" value="Refresh" />
<div class="spacer"></div>
<table class="listtable contactstable" cellspacing="0" cellpadding="0">
<tr>
<th class="tableheader">Question</th>
<th class="tableheader">Data</th>
<th class="tableheader">Sent On</th>
<th class="tableheader">Notes</th>
</tr>
@{
    for (int i = 0; i < Model.ListExportDataHistory.Count(); i++)
    {
        <tr>
        <td>@Model.ListExportDataHistory[i].PurchaseOrder.Survey.Ref</td>
        <td>@Model.ListExportDataHistory[i].datatext</td>
        <td>@Html.EditorFor(m => Model.ListExportDataHistory[i].CustomerReceived)</td>
        <td>
            @Html.TextAreaFor(m => Model.ListExportDataHistory[i].Notes, new { @class = "smallnotes" })
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].ExportDataHistoryID)
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].exportdataid)
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].purchaseorderid)
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].datatext)
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].blockid)
            @Html.HiddenFor(m => Model.ListExportDataHistory[i].DateOfExport)
        </td>
        </tr>
    }
   }
</table>
</fieldset>
}




<script type="text/javascript">
    $(".chosen").chosen();

    $(".datepicker").datepicker({
            changeMonth: true,
            changeYear: true,
            regional: 'en-GB',
            dateFormat: 'dd/mm/yy'
        });
    

</script>